import { createRouter, createWebHistory } from 'vue-router';

const routes = [
  {
    // 👇 非严格匹配，/tengyu/* 都指向 MyPage 页面
    path: '/vue/:pathMatch(.*)', // vue-router@4.x path的写法为：'/tengyu/:page*'
    name: 'vue',
    component: () => import('./view/vue/micro-app-child.vue'),
  },
  {
    // 👇 非严格匹配，/tengyu/* 都指向 MyPage 页面
    path: '/react/:pathMatch(.*)', // vue-router@4.x path的写法为：'/tengyu/:page*'
    name: 'react',
    component: () => import('./view/react/micro-app-child.vue'),
  },
]

export default  createRouter({
  mode: 'history',
  // 指定路由的模式,此处使用的是hash模式
  history: createWebHistory(),
  routes // short for `routes: routes`
})